using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Singleton<T> : MonoBehaviour where T: new()
{//泛型单例
    private static T instance;
    public static T Instance()
    {
        if (instance == null)
            instance = new T();
        return instance;
    }
}
